<!--
 * @Author: your name
 * @Date: 2019-12-13 16:45:52
 * @LastEditTime: 2019-12-13 16:50:43
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /courseware_echarts/map.html
 -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="map" style="width: 500px;height: 500px;"></div>
    <script src="./jquery.min.js"></script>
    <script src="./echarts.min.js"></script>
    <script>
        $(function () {
            $.getJSON('./122.json').then(function (res) {
                echarts.registerMap('sx', res)
                // 基于准备好的dom，初始化echarts实例
                var myChart = echarts.init(document.getElementById('map'));
                var option = {
                    series: [{
                        name: '',
                        type: 'map',
                        mapType: 'sx'
                    }]
                }

                // 使用刚指定的配置项和数据显示图表。
                myChart.setOption(option);

            })
        })
    </script>
</body>

</html>